package com.guigu.serviceorder.opfeign;


import com.guigu.common_util.pojo.utils.Result;
import com.guigu.serviceorder.entity.TbCategory;
import com.guigu.serviceorder.entity.TbSku;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@Component
@FeignClient(value = "service-goods")
public interface OpFeignSkuSpu {

    // 远程调用sku 的条件查询
    @PostMapping("servicegoods/tbsku/findList")
    public Result findList(@RequestBody Map<String, Object> searchMap);

    //远程调用sku的查询全部
    @GetMapping("servicegoods/tbsku/findAll")
    public Result findAll();

    // 远程调用
    // 根据ID查询数据
    @GetMapping("/servicegoods/tbsku/findById")
    public Result findById(String id);

    @GetMapping("/servicegoods/category/findById")
    public Result findById(Integer id);
}
